package com.zuipin.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zuipin.entity.product.EvaluationInfo;
import com.zuipin.entity.product.OverallEvaluation;
import com.zuipin.framework.annotation.Inject;
import com.zuipin.framework.annotation.Json;
import com.zuipin.framework.annotation.Jsons;
import com.zuipin.framework.annotation.Valid;
import com.zuipin.framework.annotation.Valids;
import com.zuipin.framework.emuns.ErrorCode;
import com.zuipin.framework.result.PageResult;
import com.zuipin.framework.result.Result;
import com.zuipin.service.IOverallEvaluationService;
import com.zuipin.util.Pagination;
import com.zuipin.vo.EvaluationInfoVo;
import com.zuipin.vo.EvaluationVo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 
 *
 * @ClassName OverallEvaluationController 
 * @author wangcongyi
 * @date 2017年6月30日 下午4:32:47
 */
@Api(value = "整体评价", description = "整体评价-wangcongyi")
@Controller
@RequestMapping(value = "/overallEvaluation")
public class OverallEvaluationController {

	@Resource
	private IOverallEvaluationService overallEvaluationService;
	
	@Jsons({ @Json(type = OverallEvaluation.class,include="description,logistics,service,count")})
	@RequestMapping(value = "/getOverallEval", method = RequestMethod.GET)
	@ApiOperation(value = "三期-获取商城半年内动态评分-wangcongyi", notes = "获取商城半年内动态评分" + "</br>返回码" + "</br>0-成功"
			+ "</br>1001-参数错误" + "</br>1002-必填项未填写" + "</br>1004-系统异常")
	@Valids({ @Valid(name = "overall.sysId", required = true) })
	@ApiImplicitParams({
			@ApiImplicitParam(name = "overall.sysId", value = "系统ID", required = true, dataType = "long", paramType = "query"), })
	public Result<OverallEvaluation> getOverallEval(@Inject @ApiIgnore OverallEvaluation overall) {
		Result<OverallEvaluation> result = new Result<OverallEvaluation>();
		result.setData(overallEvaluationService.getOverallEval(overall));
		result.setErrorCode(ErrorCode.SUCCESS);
		return result;
	}

}
